# -*- coding: utf-8 -*-
"""
@Author: thekernel
@Date: 2020/6/22 20:33
@Description: 保存到 mongodb
"""
import pymongo


class MongoClient(object):
    def __init__(self):
        self.client = pymongo.MongoClient(host='127.0.0.1', port=27017)
        self.db = self.client['douguo_meishi']
        self.collection = self.db['meishi']

    def inset_item(self, item):
        self.collection.insert(item)


mongo = MongoClient()
